﻿using PlainConcepts.Fx.Dnie;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace PlainConcepts.Fx.Dnie.Test
{
    
    
    /// <summary>
    ///This is a test class for DnieIdentityTest and is intended
    ///to contain all DnieIdentityTest Unit Tests
    ///</summary>
    [TestClass()]
    public class DnieIdentityTest
    {
   
        /// <summary>
        ///A test for LastName
        ///</summary>
        [TestMethod()]
        public void LastNameTest()
        {
            string name = "Unai";
            string lastName = "Zorrilla Castro";
            string dni= "2222d";

            DnieIdentity target = new DnieIdentity("Zorrilla Castro", "Unai", "2222d");

            Assert.AreEqual(lastName, target.LastName);

        }

        /// <summary>
        ///A test for FirstName
        ///</summary>
        [TestMethod()]
        public void FirstNameTest()
        {
            string name = "Unai";
            string lastName = "Zorrilla Castro";
            string dni = "2222d";

            DnieIdentity target = new DnieIdentity("Zorrilla Castro", "Unai", "2222d");

            Assert.AreEqual(name, target.FirstName);
        }

        /// <summary>
        ///A test for Dni
        ///</summary>
        [TestMethod()]
        public void DniTest()
        {
            string name = "Unai";
            string lastName = "Zorrilla Castro";
            string dni = "2222d";

            DnieIdentity target = new DnieIdentity("Zorrilla Castro", "Unai", "2222d");

            Assert.AreEqual(dni, target.Dni);
        }

        /// <summary>
        ///A test for ToString
        ///</summary>
        [TestMethod()]
        public void ToStringTest()
        {
            string name = "Unai";
            string lastName = "Zorrilla Castro";
            string dni = "2222d";

            DnieIdentity target = new DnieIdentity("Zorrilla Castro", "Unai", "2222d");

            Assert.AreEqual(string.Format("{0},{1} DNI:{2}",lastName,name,dni), target.ToString());
        }

        /// <summary>
        ///A test for DnieIdentity Constructor
        ///</summary>
        [TestMethod()]
        public void DnieIdentityConstructorTest()
        {
            string lastName = "Zorrilla Castro";
            string firstName = "Unai";
            string dni = "222dd";
            DnieIdentity target = new DnieIdentity(lastName, firstName, dni);
            
        }
    }
}
